package org.urchr.beorganized.mobile.base;

import org.apache.wicket.Request;
import org.apache.wicket.protocol.http.WebSession;

public class MobileSession extends WebSession{

	private boolean authorized = false;
	private String token = null;
	private String server = null;
	private String login = null;
	private String dateFormat = "dd/MM/yy";
	private String timeFormat = "H:mm";
	private int minuteOffset = 0;
	
	public MobileSession(Request request) {
		super(request);
	}

	public void setAuthorized(boolean authorized) {
		this.authorized = authorized;
	}

	public boolean isAuthorized() {
		return authorized;
	}

	public void setToken(String token) {
		this.token = token;
	}

	public String getToken() {
		return token;
	}

	public void setServer(String server) {
		this.server = server;
	}

	public String getServer() {
		return server;
	}

	public void setLogin(String login) {
		this.login = login;
	}

	public String getLogin() {
		return login;
	}

	private static final long serialVersionUID = -6865155788883147940L;

	public static MobileSession getSession(){
		return (MobileSession) get();
	}

	public void setDateFormat(String dateFormat) {
		this.dateFormat = dateFormat;
	}

	public String getDateFormat() {
		return dateFormat;
	}

	public void setTimeFormat(String timeFormat) {
		this.timeFormat = timeFormat;
	}

	public String getTimeFormat() {
		return timeFormat;
	}

	public void setMinuteOffset(int minuteOffset) {
		this.minuteOffset = minuteOffset;
	}

	public int getMinuteOffset() {
		return minuteOffset;
	}
	
}
